package com.inspur.ourhis_afterend.Service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.inspur.ourhis_afterend.Dao.DrugStoreDao;
import com.inspur.ourhis_afterend.Dao.DrugsDao;
import com.inspur.ourhis_afterend.Entity.DrugStore;
import com.inspur.ourhis_afterend.Service.DrugStoreService;
import com.inspur.ourhis_afterend.Tools.PageAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DrugStoreServiceImpl implements DrugStoreService {

    @Autowired
    DrugStoreDao drugStoreDao;

    @Override
    public IPage<DrugStore> findAll(PageAction pageAction) throws Exception {
        IPage<DrugStore> iPage  = new Page<>(pageAction.getPageNo(), pageAction.getPageSize());
        return drugStoreDao.selectPage(iPage, null);
    }
}
